﻿using System;
using System.Web.Mvc;
using System.Web.Routing;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Example1.Tests
{
    [TestClass]
    public class RouteTests5
    {
        [TestMethod]
        public void TestMethod1()
        {
            RouteCollection routes = new RouteCollection();

            //custome segment {scope}
            //default value : all
            routes.MapRoute("2", "{controller}/index/{scope}", new { controller = "Home", action = "Index", scope = "all" });


            RouteTestHelper.TestRouteMatch(routes, "~/Customer/index", "Customer", "Index", new { scope = "all" });

            RouteTestHelper.TestRouteMatch(routes, "~/Customer/index/active", "Customer", "Index", new { scope = "active" });

            RouteTestHelper.TestRouteMatch(routes, "~/Customer/index/inactive", "Customer", "Index", new { scope = "inactive" });
        }
    }
}
